
package com.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.CreationTimestamp;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Date;
import java.sql.Timestamp;


@Entity
@Data
@Table(name = "sys_log")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Log implements Serializable {

    @Id
    @Column(name = "log_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "日志id")
    private Long id;

    /**
     * 操作用户
     */
    @Column(name = "username")
    @ApiModelProperty(value = "操作用户")
    private String username;

    /**
     * 描述
     */
    @Column(name = "description")
    @ApiModelProperty(value = "描述")
    private String description;

    /**
     * 方法名
     */
    @Column(name = "method")
    @ApiModelProperty(value = "方法名")
    private String method;

    /**
     * 参数
     */
    @Column(name = "params")
    @ApiModelProperty(value = "参数")
    private String params;

    /**
     * 日志类型
     */
    @Column(name = "log_type")
    @ApiModelProperty(value = "日志类型")
    private String logType;

    /**
     * 请求ip
     */
    @Column(name = "request_ip")
    @ApiModelProperty(value = "请求ip")
    private String requestIp;

    /**
     * 地址
     */
    @Column(name = "address")
    @ApiModelProperty(value = "地址")
    private String address;

    /**
     * 浏览器
     */
    @Column(name = "browser")
    @ApiModelProperty(value = "浏览器（类型）")
    private String browser;

    /**
     * 请求耗时
     */
    @Column(name = "time")
    @ApiModelProperty(value = "请求耗时")
    private Long time;

    /**
     * 异常详细
     */
    @Column(name = "exception_detail")
    @ApiModelProperty(value = "异常详细阐述")
    private byte[] exceptionDetail;

    /**
     * 创建日期
     */
    @Column(name = "create_time")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;

}
